package com.why.blog.controller.admin;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @program: blog
 * @description:
 * @author: @why
 * @create: 2021-01-20 16:13
 **/
@Controller
@RequestMapping("/admin")
public class exitController {
    @RequestMapping("/exit")
    public String exitAction(HttpServletRequest request){
        request.getSession().removeAttribute("user");

        return "admin/login";
    }
}
